!DOCTYPE html>
html lang="en">

head>
    meta charset="UTF-8">
    meta http-equiv="X-UA-Compatible" content="IE=edge">
    meta name="viewport" content="width=device-width, initial-scale=1.0">
    title>慢慢买/title>
    link rel="stylesheet" href="./../css/brandTitle.css">
    script src="../js/flexible.js">/script>
/head>

body>
    !-- 头部 -->
    div id="header">
        div class=" fl logo">
            a href="">img src="./../assets/images/header_logo.png" alt="">/a>
        /div>
        div class="app fr">
            a href="">img src="./../assets/images/./header_app.png" alt="">/a>
        /div>
    /div>
        !-- 搜索 -->
        section id="search">
            div class="searchbox">
                input type="text" name placeholder="请输入您想比价的产品">
            /div>
            div class="button">
                button>搜索/button>
            /div>
        /section>

        !-- 首页 -->
        div class="backup clearfix">
            a href="index.html">首页&gt/a>
            a href="">全部分类&gt/a>
        /div>
        div class="chartss">
            p>热门品牌排行/p>
        /div>

        !-- 数据 -->
        div class="info" id="info">
            ul class="u1">
                    li class="lis"> /li>
                    div id="container">/div>
            /ul>
        /div>

        !-- 尾巴 -->
        div id="footer">
            div class="more">
                a href>更多优惠信息&gt;&gt;/a>
            /div>
            div class="chart">
                span class="chart-1">品牌排行/span>
                span class="chart-2">&gt;&gt;/span>
            /div>
            div class="login">
                div class="row-1">
                    a href="">div>登入/div> /a>
                    a href="">div>注册/div>/a>
                    a href="">div>返回顶部/div>/a>
                /div>
                div class="row-2">
                    p>
                        a href="">手机APP下载/a>
                        a href="">慢慢买手机版/a>
                        "--掌上比价平台"
                    /p> 
                    p>m.manmanbuy.com /p>
                /div>
    
            /div>
        /div>
/body>

/html>
script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.js">/script>
script>
    $(document).ready(function() {
        console.log("12312213")
         let uu = document.querySelector('ul');
        $.ajax({
            url: "http://chst.vip:1234/api/getbrandtitle"
        }).then(res => {
            console.log(res);
            let html = "";//页面结构
            res.result.forEach(item => {
                html += `
                        li>${item.brandTitle}/li>
                        `
            })
            uu.innerHTML = html;//将li添加到dom
        })
    })
    let ctns = document.querySelectorAll("#container")
    ctns = [...ctns]
    ctns.forEach(item => {
        let titleid = item.getAttribute("titleid")
        fetch("http://chst.vip:1234/api/get?brandtitleid="+titleid)
        .then(body => body.json())
        .then(res =>{
            let html = ""
            res.result.forEach(item =>{
                html +=''
            })
        })
    })
    
/script>